package xyz.jangle.design.state;
/**
 * 状态模式
 * @author Administrator
 *
 */
public class AppMain20 {

	public static void main(String[] args) {
		ConcreteStateA stateA = new ConcreteStateA();
		Context context = new Context();
		context.setState(stateA);
		context.request();
		
		context.setState(new ConcreteStateB());	//切换状态B
		context.request();
	}

}
